import math
l=[]
count1 = 0
count2 = 0

for i in range(3,20000,2):
    j=math.sqrt(i)
    j=math.ceil(j)
    for x in range(3,j+1,2):
        count1+=1
        if i%x ==0:
            count2+=1
            break
    else:
        l.append(i)
else:
    print(count1,count2)
    print([2]+l)

